/*
Copyright 2023 The Malachite Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

/* automatically generated by rust-bindgen 0.59.1 */
use serde::{Deserialize, Serialize};

pub const SYSTEM_EVENT_MASK_GENERIC: i32 = 0;
pub const SYSTEM_EVENT_MASK_IO: i32 = 1;
pub const SYSTEM_EVENT_MASK_FS: i32 = 2;
pub const SYSTEM_EVENT_MASK_NET: i32 = 3;
pub const SYSTEM_EVENT_MASK_MEM: i32 = 4;
pub const SYSTEM_EVENT_MASK_SCHED: i32 = 5;

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct init_options {
    pub mask: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_init_options() {
    assert_eq!(
        ::std::mem::size_of::<init_options>(),
        8usize,
        concat!("Size of: ", stringify!(init_options))
    );
    assert_eq!(
        ::std::mem::align_of::<init_options>(),
        8usize,
        concat!("Alignment of ", stringify!(init_options))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<init_options>())).mask as *const _ as usize },
        0,
        concat!(
            "Offset of field: ",
            stringify!(init_options),
            "::",
            stringify!(mask)
        )
    );
}
extern "C" {
    pub fn init_bpf(options: *mut init_options) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn free_bpf();
}
extern "C" {
    pub fn bpf_module_ctl(mask: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct fs_data {
    pub fs_created: ::std::os::raw::c_ulong,
    pub fs_open: ::std::os::raw::c_ulong,
    pub fs_read: ::std::os::raw::c_ulong,
    pub fs_read_bytes: ::std::os::raw::c_ulong,
    pub fs_write: ::std::os::raw::c_ulong,
    pub fs_write_bytes: ::std::os::raw::c_ulong,
    pub fs_fsync: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_fs_data() {
    assert_eq!(
        ::std::mem::size_of::<fs_data>(),
        56usize,
        concat!("Size of: ", stringify!(fs_data))
    );
    assert_eq!(
        ::std::mem::align_of::<fs_data>(),
        8usize,
        concat!("Alignment of ", stringify!(fs_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_created as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_created)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_open as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_open)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_read as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_read)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_read_bytes as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_read_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_write as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_write)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_write_bytes as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_write_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fs_data>())).fs_fsync as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(fs_data),
            "::",
            stringify!(fs_fsync)
        )
    );
}
#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct net_data {
    pub net_tcp_rx: ::std::os::raw::c_ulong,
    pub net_tcp_rx_bytes: ::std::os::raw::c_ulong,
    pub net_tcp_tx: ::std::os::raw::c_ulong,
    pub net_tcp_tx_bytes: ::std::os::raw::c_ulong,
    pub net_udp_rx: ::std::os::raw::c_ulong,
    pub net_udp_rx_bytes: ::std::os::raw::c_ulong,
    pub net_udp_tx: ::std::os::raw::c_ulong,
    pub net_udp_tx_bytes: ::std::os::raw::c_ulong,
    pub net_dev_tcp_rx: [::std::os::raw::c_ulong; 8usize],
    pub net_dev_tcp_rx_bytes: [::std::os::raw::c_ulong; 8usize],
    pub net_dev_tcp_tx: [::std::os::raw::c_ulong; 8usize],
    pub net_dev_tcp_tx_bytes: [::std::os::raw::c_ulong; 8usize],
    pub net_close_wait: ::std::os::raw::c_ulong,
    pub net_retrans_seqs: ::std::os::raw::c_ulong,
}

#[test]
fn bindgen_test_layout_net_data() {
    assert_eq!(
        ::std::mem::size_of::<net_data>(),
        336usize,
        concat!("Size of: ", stringify!(net_data))
    );
    assert_eq!(
        ::std::mem::align_of::<net_data>(),
        8usize,
        concat!("Alignment of ", stringify!(net_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_tcp_rx as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_tcp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_tcp_rx_bytes as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_tcp_rx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_tcp_tx as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_tcp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_tcp_tx_bytes as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_tcp_tx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_udp_rx as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_udp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_udp_rx_bytes as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_udp_rx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_udp_tx as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_udp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_udp_tx_bytes as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_udp_tx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_dev_tcp_rx as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_dev_tcp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_dev_tcp_rx_bytes as *const _ as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_dev_tcp_rx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_dev_tcp_tx as *const _ as usize },
        192usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_dev_tcp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_dev_tcp_tx_bytes as *const _ as usize },
        256usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_dev_tcp_tx_bytes)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_close_wait as *const _ as usize },
        320usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_close_wait)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<net_data>())).net_retrans_seqs as *const _ as usize },
        328usize,
        concat!(
            "Offset of field: ",
            stringify!(net_data),
            "::",
            stringify!(net_retrans_seqs)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct nr_tasks {
    pub nr_iowait: ::std::os::raw::c_ulong,
    pub nr_unint: ::std::os::raw::c_ulong,
    pub nr_runnable: ::std::os::raw::c_ulong,
}

#[test]
fn bindgen_test_layout_cgroup_nr_tasks() {
    assert_eq!(
        ::std::mem::size_of::<nr_tasks>(),
        24usize,
        concat!("Size of: ", stringify!(nr_tasks))
    );
    assert_eq!(
        ::std::mem::align_of::<nr_tasks>(),
        8usize,
        concat!("Alignment of ", stringify!(nr_tasks))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<nr_tasks>())).nr_iowait as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(nr_tasks),
            "::",
            stringify!(nr_iowait)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<nr_tasks>())).nr_unint as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(nr_tasks),
            "::",
            stringify!(nr_unint)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<nr_tasks>())).nr_runnable as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(nr_tasks),
            "::",
            stringify!(nr_runnable)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct io_latpcts {
    pub pcts: ::std::os::raw::c_uint,
    pub sum_lat: [::std::os::raw::c_uint; 3],
    pub driver_lat: [::std::os::raw::c_uint; 3],
}
#[test]
fn bindgen_test_layout_io_latpcts() {
    assert_eq!(
        ::std::mem::size_of::<io_latpcts>(),
        28usize,
        concat!("Size of: ", stringify!(io_latpcts))
    );
    assert_eq!(
        ::std::mem::align_of::<io_latpcts>(),
        4usize,
        concat!("Alignment of ", stringify!(io_latpcts))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<io_latpcts>())).pcts as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(io_latpcts),
            "::",
            stringify!(pcts)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<io_latpcts>())).sum_lat as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(io_latpcts),
            "::",
            stringify!(sum_lat)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<io_latpcts>())).driver_lat as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(io_latpcts),
            "::",
            stringify!(driver_lat)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct mem_data {
    pub mem_oom_cnt: ::std::os::raw::c_ulong,
    pub mem_reclaim_cnt: ::std::os::raw::c_ulong,
    pub mem_reclaim_time: ::std::os::raw::c_ulong,
    pub mem_compact_cnt: ::std::os::raw::c_ulong,
    pub mem_compact_time: ::std::os::raw::c_ulong,
    pub mem_alloc_cnt: ::std::os::raw::c_ulong,
    pub mem_alloc_time: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_mem_data() {
    assert_eq!(
        ::std::mem::size_of::<mem_data>(),
        56usize,
        concat!("Size of: ", stringify!(mem_data))
    );
    assert_eq!(
        ::std::mem::align_of::<mem_data>(),
        8usize,
        concat!("Alignment of ", stringify!(mem_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_oom_cnt as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_oom_cnt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_reclaim_cnt as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_reclaim_cnt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_reclaim_time as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_reclaim_time)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_compact_cnt as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_compact_cnt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_compact_time as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_compact_time)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_alloc_cnt as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_alloc_cnt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<mem_data>())).mem_alloc_time as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(mem_data),
            "::",
            stringify!(mem_alloc_time)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct pmu_data {
    pub cycles: ::std::os::raw::c_ulong,
    pub instructions: ::std::os::raw::c_ulong,
    pub ocr_read_drams: ::std::os::raw::c_ulong,
    pub store_ins: ::std::os::raw::c_ulong,
    pub store_all_ins: ::std::os::raw::c_ulong,
    pub imc_writes: ::std::os::raw::c_ulong,
}

#[test]
fn bindgen_test_layout_pmu_data() {
    assert_eq!(
        ::std::mem::size_of::<pmu_data>(),
        48usize,
        concat!("Size of: ", stringify!(pmu_data))
    );
    assert_eq!(
        ::std::mem::align_of::<pmu_data>(),
        8usize,
        concat!("Alignment of ", stringify!(pmu_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<pmu_data>())).cycles as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(pmu_data),
            "::",
            stringify!(cycles)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<pmu_data>())).instructions as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(pmu_data),
            "::",
            stringify!(instructions)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<pmu_data>())).ocr_read_drams as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(pmu_data),
            "::",
            stringify!(ocr_read_drams)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_data {
    pub gen: system_event_gen,
    pub io: system_event_io,
    pub fs: system_event_fs,
    pub net: system_event_net,
    pub mem: system_event_mem,
    pub sched: system_event_sched,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_gen {
    pub soft_lockup: ::std::os::raw::c_ulong,
    pub rcu_stall: ::std::os::raw::c_ulong,
    pub bad_page: ::std::os::raw::c_ulong,
    pub kernel_warn: ::std::os::raw::c_ulong,
    pub mce_uc: ::std::os::raw::c_ulong,
    pub panic_ts: ::std::os::raw::c_ulong,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_io {
    pub io_error: ::std::os::raw::c_ulong,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_fs {
    pub ext4_error: ::std::os::raw::c_ulong,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_net {
    pub xmit_timeout: ::std::os::raw::c_ulong,
    pub tcp_bad_csum: ::std::os::raw::c_ulong,
    pub link_down: ::std::os::raw::c_ulong,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_mem {
    pub alloc_failure: ::std::os::raw::c_ulong,
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct system_event_sched {
    pub hung_task: ::std::os::raw::c_ulong,
    pub coredump: ::std::os::raw::c_ulong,
}

#[test]
fn bindgen_test_layout_system_event_data() {
    assert_eq!(
        ::std::mem::size_of::<system_event_data>(),
        112usize,
        concat!("Size of: ", stringify!(system_event_data))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<system_event_data>())).gen.kernel_warn as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(system_event_data),
            "::",
            stringify!(kernel_warn)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<system_event_data>())).io.io_error as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(system_event_data),
            "::",
            stringify!(io_error)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<system_event_data>())).fs.ext4_error as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(system_event_data),
            "::",
            stringify!(ext4_error)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<system_event_data>())).net.link_down as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(system_event_data),
            "::",
            stringify!(link_down)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<system_event_data>()))
                .mem
                .alloc_failure as *const _ as usize
        },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(system_event_data),
            "::",
            stringify!(tcp_bad_csum)
        )
    );
}

#[repr(C)]
#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct bpf_program_stats {
    pub id: ::std::os::raw::c_uint,
    pub name: [::std::os::raw::c_char; 16],
    pub run_time_ns: ::std::os::raw::c_ulong,
    pub run_cnt: ::std::os::raw::c_ulong,
    pub load_time: ::std::os::raw::c_ulong,
}

impl bpf_program_stats {
    pub fn new() -> bpf_program_stats {
        bpf_program_stats::default()
    }
}

#[test]
fn bindgen_test_layout_bpf_program_stats() {
    assert_eq!(
        ::std::mem::size_of::<bpf_program_stats>(),
        48usize,
        concat!("Size of: ", stringify!(bpf_program_stats))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<bpf_program_stats>())).name as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(bpf_program_stats),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<bpf_program_stats>())).run_time_ns as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(bpf_program_stats),
            "::",
            stringify!(run_time_ns)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<bpf_program_stats>())).run_cnt as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(bpf_program_stats),
            "::",
            stringify!(run_cnt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<bpf_program_stats>())).load_time as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(bpf_program_stats),
            "::",
            stringify!(load_time)
        )
    );
}

extern "C" {
    pub fn cgroup_nr_tasks(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut nr_tasks,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cgroup_fs_data(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut fs_data,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cgroup_net_data(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut net_data,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cgroup_mem_data(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut mem_data,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cgroup_io_latpcts(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut io_latpcts,
        num: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_bpf_mask() -> ::std::os::raw::c_ulong;
}
extern "C" {
    pub fn get_cgroup_pmu_data(
        cgroup_path: *const ::std::os::raw::c_char,
        data: *mut pmu_data,
        time: ::std::os::raw::c_ulong,
    ) -> ::std::os::raw::c_int;
}

extern "C" {
    pub fn get_system_event_count(data: *mut system_event_data) -> ::std::os::raw::c_int;
}

#[repr(C)]
#[derive(Default)]
pub struct system_event_mask {
    pub mask: ::std::os::raw::c_ulong,
}

impl system_event_mask {
    pub fn new() -> system_event_mask {
        system_event_mask { mask: 0 }
    }

    pub fn enable_generic(&mut self) {
        self.mask |= 1 << SYSTEM_EVENT_MASK_GENERIC
    }

    pub fn enable_storage(&mut self) {
        self.mask |= 1 << SYSTEM_EVENT_MASK_IO;
        self.mask |= 1 << SYSTEM_EVENT_MASK_FS
    }

    pub fn enable_net(&mut self) {
        self.mask |= 1 << SYSTEM_EVENT_MASK_NET
    }

    pub fn enable_mem(&mut self) {
        self.mask |= 1 << SYSTEM_EVENT_MASK_MEM
    }

    pub fn enable_sched(&mut self) {
        self.mask |= 1 << SYSTEM_EVENT_MASK_SCHED
    }
}
extern "C" {
    pub fn system_event_config(event_mask: *const system_event_mask) -> ::std::os::raw::c_int;
}

extern "C" {
    pub fn get_bpf_prog_stats(
        stats: *mut bpf_program_stats,
        stats_size: ::std::os::raw::c_int,
        bpf_count: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
